-
Notifications
You must be signed in to change notification settings - Fork 6
VPLAY-11143: AAMP mp4Demux Integration #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev_sprint_25_2
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates the mp4Demux component formally into AAMP to enable demuxing of MP4 fragmented content. The integration adds support for handling both linear and VOD content through a new configuration option eAAMPConfig_UseMp4Demux.
Key Changes:
- Introduces new
Mp4Demuxclass to parse MP4 boxes and extract media samples with DRM metadata - Adds
AampMp4Demuxerwrapper class implementing theMediaProcessorinterface for AAMP integration - Defines new data types (
AampCodecInfo,AampMediaSample,AampDrmMetadata) to represent demuxed content - Updates GStreamer pipeline integration to handle demuxed samples directly instead of forwarding full segments
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| mp4demux/Mp4Demux.hpp | New core MP4 demuxer implementation with box parsing and sample extraction logic |
| mp4demux/AampMp4Demuxer.h/cpp | AAMP integration wrapper that adapts Mp4Demux to MediaProcessor interface |
| AampDemuxDataTypes.h | Common data type definitions for codec info, samples, and DRM metadata |
| streamabstraction.cpp | Updates media processor initialization to conditionally use Mp4Demux based on config |
| priv_aamp.h/cpp | Adds new SendStreamTransfer and SetStreamCaps methods for sample-based transfer |
| aampgstplayer.h/cpp | Updates GStreamer integration to handle MediaSample objects and set stream caps |
| middleware/InterfacePlayerRDK.h/cpp | Defines GStreamer-specific data types and updates SendHelper signature |
| StreamSink.h | Adds abstract SendSample and SetStreamCaps methods to base interface |
| aampgstplayer.h | Updates AAMPGstPlayer SendHelper signature to accept MediaSample |
| AampStreamSinkInactive.h | Adds stub SendSample implementation for inactive streams |
| mediaprocessor.h | Adds getCodecInfo virtual method to MediaProcessor base class |
| isobmff/isobmffprocessor.h | Implements getCodecInfo for ISO BMFF processor |
| fragmentcollector_mpd.h/cpp | Adds GetStreamCodecInfo to retrieve codec information from tracks |
| test/aampcli/AampcliPlaybackCommand.cpp | Updates CLI tool to use new Mp4Demux API with shared_ptr and detailed sample logging |
| test/qtdemuxAnalyzer/qtdemuxAnalyzer.cpp | Improves caps logging by converting full caps to string |
| test/gstTestHarness/mp4demux.hpp | Renames fields (horizresolution→horizontal_resolution, etc.) and fixes spelling |
| CMakeLists.txt | Updates include paths and source list to include mp4demux directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| CodecInfo gstCodecInfo; | ||
| gstCodecInfo.codecFormat = (GstStreamOutputFormat)codecInfo.mCodecFormat; | ||
| gstCodecInfo.codecData = std::move(codecInfo.mCodecData); |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The std::move(codecInfo.mCodecData) operation may cause issues if the source codecInfo is used again later. Since this is converting between data types, consider using a copy instead: gstCodecInfo.codecData = codecInfo.mCodecData;
| gstCodecInfo.codecData = std::move(codecInfo.mCodecData); | |
| gstCodecInfo.codecData = codecInfo.mCodecData; |
62a459c to
b7af6da
Compare
Coverity Issue - Data race conditionAccessing "this->mPauseInjector" without holding lock "InterfacePlayerRDK.mSourceSetupMutex". Elsewhere, "InterfacePlayerRDK.mPauseInjector" is written to with "InterfacePlayerRDK.mSourceSetupMutex" held 2 out of 2 times (2 of these accesses strongly imply that it is necessary). Medium Impact, CWE-366 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
b7af6da to
5a25935
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5a25935 to
8eaf1e4
Compare
8eaf1e4 to
ee168c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ee168c9 to
7af0feb
Compare
7af0feb to
5cd2eac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5cd2eac to
ab4a7fa
Compare
ab4a7fa to
3bf778e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 39 out of 40 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
092ad05 to
ef7a394
Compare
ef7a394 to
0067eef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 52 out of 53 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0067eef to
4eb8855
Compare
| * @param[in] frameRate - rate per second | ||
| * @return void | ||
| */ | ||
| void setFrameRateForTM (int frameRate) override { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should spell out "TrickMode" rather than using "TM" abbreviation
| /** | ||
| * @brief optionally specify new pts offset to apply for subsequently injected TS media segments | ||
| */ | ||
| void setPtsOffset( double ptsOffset ) override { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming this for non-invasive pts restamping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Coverity Issue - Resource leak in objectAllocating memory by calling "new Configs". High Impact, CWE-401 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
90f5d84 to
1702846
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Reason for change: Integrate mp4Demux formally into AAMP Test Procedure: Test with useMp4Demux=true and validate all types of Linear, VOD content in all apps. Risks: Low Signed-off-by: Vinish100 <[email protected]>
Reason for change: Added function headers, split up Mp4Demux.hpp to a .h and .cpp. Code cleanup Test Procedure: Play clear and encrypted content using mp4demux Risks: Low Signed-off-by: Vinish100 <[email protected]>
Reason for change: Ensure coding guidelines are strictly followed. Code cleanup. Enforce encrypted caps are persisted when processing clear samples in between Test Procedure: As mentioned in the ticket Risks: None Signed-off-by: Vinish100 <[email protected]>
Reason for change: Fix L1s with Mp4Demux Test Procedure: Test with useMp4Demux=true and validate all types of Linear, VOD content in all apps. Risks: Low Signed-off-by: lashmintha <[email protected]>
Reason for change: Fix review comments. Introduced error detection and propogation in Mp4Demuxer. Code cleanup Test Procedure: As mentioned in the ticket Risks: Low Signed-off-by: Vinish100 <[email protected]>
Reason for change:pipeline reconfigure is avoided if stream format is unknown Procedure: As mentioned in the ticket Risks: Low Signed-off-by: varshnie <[email protected]>
Reason for change:Removed isobmff format setting hack Procedure: As mentioned in the ticket Risks: Low Signed-off-by: varshnie <[email protected]>
Reason for change: Included possible L1 test for validating Mp4demux functionality,
1. Added AampMp4DemuxTests tests which validates SendSegment() in possible scenario's
2. Added Mp4BoxParsingtests which validates all the box parsing pssh, saiz, senc, trun, tfhd, moof, tenc, ftyp
Test Procedure: Test with useMp4Demux=true and validate all types of Linear, VOD content in all apps.
Risks: Low
Signed-off-by: lashmintha <[email protected]>
a26ec9c to
8b19f3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Reason for change: Integrate mp4Demux formally into AAMP
Test Procedure: Test with useMp4Demux=true and validate all types of Linear, VOD content in all apps.
Risks: Medium